// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_HR_TRAVEL_APPLICATION
// * CreateDate    : 2011/11/8 21:33:17
// * Creater       : CodeSmith
// * LastChangeDate: 2011/11/8 21:33:17
// * LastChanger   : 2011/11/8 21:33:17
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class HrTravelApplicationEntity : EntityBase
    {
        public HrTravelApplicationTable TableSchema
        {
            get
            {
                return HrTravelApplicationTable.Current;
            }
		}
		
		public HrTravelApplicationEntity()
        {

        }
		
		public HrTravelApplicationEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
            this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
            this.TravelCode = Convert.ToString(CommonFunctions.ToObject(dr["TRAVEL_CODE"]));
			this.DepartmentId = Convert.ToString(CommonFunctions.ToObject(dr["DEPARTMENT_ID"]));
			this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
			this.StartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["START_DATE"]));
			this.EndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["END_DATE"]));
			this.Destination = Convert.ToString(CommonFunctions.ToObject(dr["DESTINATION"]));
			this.TravelReason = Convert.ToString(CommonFunctions.ToObject(dr["TRAVEL_REASON"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public HrTravelApplicationEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
            this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
            this.TravelCode = Convert.ToString(CommonFunctions.ToObject(dr["TRAVEL_CODE"]));
			this.DepartmentId = Convert.ToString(CommonFunctions.ToObject(dr["DEPARTMENT_ID"]));
			this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
			this.StartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["START_DATE"]));
			this.EndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["END_DATE"]));
			this.Destination = Convert.ToString(CommonFunctions.ToObject(dr["DESTINATION"]));
			this.TravelReason = Convert.ToString(CommonFunctions.ToObject(dr["TRAVEL_REASON"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HrTravelApplicationTable.Current;
            }
        }
		
		#region Perporty List
        public string ApplicationId
        {
            get { return Convert.ToString(GetData(HrTravelApplicationTable.C_APPLICATION_ID)); }
            set { SetData(HrTravelApplicationTable.C_APPLICATION_ID, value); }
        }

        public string TravelCode
        {
            get { return Convert.ToString(GetData(HrTravelApplicationTable.C_TRAVEL_CODE)); }
            set { SetData(HrTravelApplicationTable.C_TRAVEL_CODE, value); }
        }
		
        public string DepartmentId
        {
            get { return Convert.ToString(GetData(HrTravelApplicationTable.C_DEPARTMENT_ID)); }
            set { SetData(HrTravelApplicationTable.C_DEPARTMENT_ID, value); }
        }
		
        public string PersonId
        {
            get { return Convert.ToString(GetData(HrTravelApplicationTable.C_PERSON_ID)); }
            set { SetData(HrTravelApplicationTable.C_PERSON_ID, value); }
        }
		
        public DateTime StartDate
        {
            get { return Convert.ToDateTime(GetData(HrTravelApplicationTable.C_START_DATE)); }
            set { SetData(HrTravelApplicationTable.C_START_DATE, value); }
        }
		
        public DateTime EndDate
        {
            get { return Convert.ToDateTime(GetData(HrTravelApplicationTable.C_END_DATE)); }
            set { SetData(HrTravelApplicationTable.C_END_DATE, value); }
        }
		
        public string Destination
        {
            get { return Convert.ToString(GetData(HrTravelApplicationTable.C_DESTINATION)); }
            set { SetData(HrTravelApplicationTable.C_DESTINATION, value); }
        }
		
        public string TravelReason
        {
            get { return Convert.ToString(GetData(HrTravelApplicationTable.C_TRAVEL_REASON)); }
            set { SetData(HrTravelApplicationTable.C_TRAVEL_REASON, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(HrTravelApplicationTable.C_REMARK)); }
            set { SetData(HrTravelApplicationTable.C_REMARK, value); }
        }
		
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(HrTravelApplicationTable.C_CREATED_BY)); }
            set { SetData(HrTravelApplicationTable.C_CREATED_BY, value); }
        }
		
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(HrTravelApplicationTable.C_CREATED_DATE)); }
            set { SetData(HrTravelApplicationTable.C_CREATED_DATE, value); }
        }
		
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(HrTravelApplicationTable.C_LAST_MODIFIED_BY)); }
            set { SetData(HrTravelApplicationTable.C_LAST_MODIFIED_BY, value); }
        }
		
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(HrTravelApplicationTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(HrTravelApplicationTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(HrTravelApplicationTable.C_APPROVED_BY)); }
            set { SetData(HrTravelApplicationTable.C_APPROVED_BY, value); }
        }
		
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(HrTravelApplicationTable.C_APPROVED_DATE)); }
            set { SetData(HrTravelApplicationTable.C_APPROVED_DATE, value); }
        }
		
        public string Status
        {
            get { return Convert.ToString(GetData(HrTravelApplicationTable.C_STATUS)); }
            set { SetData(HrTravelApplicationTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

